//package _Banque;

import java.io.*;
//import _Exception.*;


/**
 * La classe OperationBancaire fournit
 * l'ensemble des moyens necessaires a la description des flux
 * financiers entre les comptes bancaires des clients.
 *
 * @authors J. Colin & N. Nagy
 *
 * V1.0.0
 */
public class OperationBancaire implements Serializable
{
	private static final long serialVersionUID = -7205409329918449766L;

	private char    m_typeOperation; ///< N=Neutre, V=Versement, R=Retrait, I=remuneratIon
	private long	m_numeroOperation;
	private String  m_intituleOperation;
	private String  m_dateOperation;
	private float   m_montantOperation;

	/**
	 * Constructeur par defaut.
	 */
	public OperationBancaire(){
		m_typeOperation = 'N';
		m_numeroOperation = 0;
		m_intituleOperation = "---";
		m_dateOperation = _Banque.dateCourante();
		m_montantOperation = 0.f;
	}

	/**
	 * Constructeurs normal
	 */
	public OperationBancaire(final Banque banque ,char type, String intitule, float montant)
	{
		m_typeOperation = type;
		m_dateOperation = _Banque.dateCourante();
		m_intituleOperation = intitule;
		m_montantOperation = montant;
		m_numeroOperation = banque.numeroRegistreOp();
	}

	/**
	 * Retourne le type d'operation
	 */
	public char getType(){
		return m_typeOperation;
	}

	/**
	 * Retourne le numero d'operation
	 */
	public long getNumero(){
		return m_numeroOperation;
	}

	/**
	 * Retourne l'intitule de l'operation
	 */
	public String getIntitule(){
		return m_intituleOperation;
	}

	/**
	 * Retourne la date de l'operation
	 */
	public String getDate(){
		return m_dateOperation;
	}

	/**
	 * Retourne le montant de l'operation
	 */
	public float getMontant(){
		return m_montantOperation;
	}


}
